package com.xbongbong.saas.domain.entity;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * tb_saas_product_unit_price
 * 
 * @author lee
 */
@Getter
@Setter
@ToString
public class ProductUnitPriceEntity implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;

    /**
     * 父产品id
     */
    private Long parentId;

    /**
     * 产品id

     */
    private Long productId;
    /**
     *
     */
    private Long unitGroupId;
    /**
     * 单价mapping
     */
    private JSONArray price;

    /**
     * 创建时间
     */
    private Long addTime;

    /**
     * 跟新时间
     */
    private Long updateTime;

    /**
     * 删除标记
     */
    private Integer del;

    private static final long serialVersionUID = 1L;

    public ProductUnitPriceEntity() {
        long now = DateTimeUtil.getInt();
        this.addTime = now;
        this.updateTime = now;
        this.del = 0;
    }

    public ProductUnitPriceEntity(Long id, String corpid, Long parentId, Long productId, Long unitGroupId, JSONArray price, Long addTime, Long updateTime, Integer del) {
        this.id = id;
        this.corpid = corpid;
        this.parentId = parentId;
        this.productId = productId;
        this.unitGroupId = unitGroupId;
        this.price = price;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.del = del;
    }
}